<html>
<head>
<title>Docs For Class Cluster</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td class="header_top">smt2</td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
        
                                    
                                                                      		  [ <a href="../classtrees_smt2.html" class="menu">class tree: smt2</a> ]
		  [ <a href="../elementindex_smt2.html" class="menu">index: smt2</a> ]
		  	    [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
      <b>Packages:</b><br />
              <a href="../li_smt2.html">smt2</a><br />
              <a href="../li_PegasusPHP.html">PegasusPHP</a><br />
              <a href="../li_PHPMailer.html">PHPMailer</a><br />
            <br /><br />
                        <b>Files:</b><br />
      	  <div class="package">
			<a href="../smt2/_class.cluster.php.html">		class.cluster.php
		</a><br>
			<a href="../smt2/_class.domutil.php.html">		class.domutil.php
		</a><br>
			<a href="../smt2/_class.kmeans.php.html">		class.kmeans.php
		</a><br>
			<a href="../smt2/_class.point.php.html">		class.point.php
		</a><br>
			<a href="../smt2/_class.prettydate.php.html">		class.prettydate.php
		</a><br>
			<a href="../smt2/_define.php.html">		define.php
		</a><br>
			<a href="../smt2/_functions.db.php.html">		functions.db.php
		</a><br>
			<a href="../smt2/_functions.php.html">		functions.php
		</a><br>
			<a href="../smt2/_messages.php.html">		messages.php
		</a><br>
	  </div><br />
      
      
            <b>Classes:</b><br />
        <div class="package">
		    		<a href="../smt2/Cluster.html">Cluster</a><br />
	    		<a href="../smt2/DOMUtil.html">DOMUtil</a><br />
	    		<a href="../smt2/KMeans.html">KMeans</a><br />
	    		<a href="../smt2/Point.html">Point</a><br />
	    		<a href="../smt2/prettyDate.html">prettyDate</a><br />
	  </div>
                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1>Class: Cluster</h1>
Source Location: /class.cluster.php<br /><br />


<table width="100%" border="0">
<tr><td valign="top">

<h3><a href="#class_details">Class Overview</a></h3>
<pre></pre><br />
<div class="description">Defines a Cluster.</div><br /><br />






        
</td>

<td valign="top">
<h3><a href="#class_vars">Variables</a></h3>
<ul>
    <li><a href="../smt2/Cluster.html#var$avgPoint">$avgPoint</a></li>
    <li><a href="../smt2/Cluster.html#var$maxPoint">$maxPoint</a></li>
    <li><a href="../smt2/Cluster.html#var$medPoint">$medPoint</a></li>
    <li><a href="../smt2/Cluster.html#var$points">$points</a></li>
    <li><a href="../smt2/Cluster.html#var$variance">$variance</a></li>
  </ul>
</td>


<td valign="top">
<h3><a href="#class_methods">Methods</a></h3>
<ul>
    <li><a href="../smt2/Cluster.html#method__construct">__construct</a></li>
    <li><a href="../smt2/Cluster.html#methodcalculateAverage">calculateAverage</a></li>
    <li><a href="../smt2/Cluster.html#methodcalculateMedian">calculateMedian</a></li>
    <li><a href="../smt2/Cluster.html#methodcalculateVariance">calculateVariance</a></li>
    <li><a href="../smt2/Cluster.html#methodsetMaxPoint">setMaxPoint</a></li>
  </ul>
</td>

</tr></table>
<hr />

<table width="100%" border="0"><tr>






</tr></table>
<hr />

<a name="class_details"></a>
<h3>Class Details</h3>
<div class="tags">
[line <a href="../__filesource/fsource_smt2__class.cluster.php.html#a8">8</a>]<br />
Defines a Cluster.<br /><br /><p>Each cluster is a set of $points (x,y), with a center (x,y) and variance on (x,y) directions</p><br /></div><br /><br />
<div class="top">[ <a href="#top">Top</a> ]</div><br />

<hr />
<a name="class_vars"></a>
<h3>Class Variables</h3>
<div class="tags">
	<a name="var$avgPoint"></a>
	<p></p>
	<h4>$avgPoint = <span class="value"></span></h4>
	<p>[line <a href="../__filesource/fsource_smt2__class.cluster.php.html#a15">15</a>]</p>
  Cluster center (mean)<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>

  <br />
	<div class="tags">
  <table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><b>Type:</b>&nbsp;&nbsp;</td>
      <td>mixed</td>
    </tr>
      </table>
	</div><br /><br />
	<div class="top">[ <a href="#top">Top</a> ]</div><br />
	<a name="var$maxPoint"></a>
	<p></p>
	<h4>$maxPoint = <span class="value"></span></h4>
	<p>[line <a href="../__filesource/fsource_smt2__class.cluster.php.html#a13">13</a>]</p>
  Maximum point value from sample<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>

  <br />
	<div class="tags">
  <table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><b>Type:</b>&nbsp;&nbsp;</td>
      <td>mixed</td>
    </tr>
      </table>
	</div><br /><br />
	<div class="top">[ <a href="#top">Top</a> ]</div><br />
	<a name="var$medPoint"></a>
	<p></p>
	<h4>$medPoint = <span class="value"></span></h4>
	<p>[line <a href="../__filesource/fsource_smt2__class.cluster.php.html#a17">17</a>]</p>
  Cluster meadian<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>

  <br />
	<div class="tags">
  <table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><b>Type:</b>&nbsp;&nbsp;</td>
      <td>mixed</td>
    </tr>
      </table>
	</div><br /><br />
	<div class="top">[ <a href="#top">Top</a> ]</div><br />
	<a name="var$points"></a>
	<p></p>
	<h4>$points = <span class="value"></span></h4>
	<p>[line <a href="../__filesource/fsource_smt2__class.cluster.php.html#a11">11</a>]</p>
  Cluster points<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>

  <br />
	<div class="tags">
  <table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><b>Type:</b>&nbsp;&nbsp;</td>
      <td>mixed</td>
    </tr>
      </table>
	</div><br /><br />
	<div class="top">[ <a href="#top">Top</a> ]</div><br />
	<a name="var$variance"></a>
	<p></p>
	<h4>$variance = <span class="value"></span></h4>
	<p>[line <a href="../__filesource/fsource_smt2__class.cluster.php.html#a19">19</a>]</p>
  Cluster variance<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>

  <br />
	<div class="tags">
  <table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><b>Type:</b>&nbsp;&nbsp;</td>
      <td>mixed</td>
    </tr>
      </table>
	</div><br /><br />
	<div class="top">[ <a href="#top">Top</a> ]</div><br />
</div><br />

<hr />
<a name="class_methods"></a>
<h3>Class Methods</h3>
<div class="tags">

  <hr />
	<a name="method__construct"></a>
	<h3>constructor __construct <span class="smalllinenumber">[line <a href="../__filesource/fsource_smt2__class.cluster.php.html#a21">21</a>]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>Cluster __construct(

$center)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		<br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$center</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodcalculateAverage"></a>
	<h3>method calculateAverage <span class="smalllinenumber">[line <a href="../__filesource/fsource_smt2__class.cluster.php.html#a36">36</a>]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void calculateAverage(
)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Computes the cluster center (mean)<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodcalculateMedian"></a>
	<h3>method calculateMedian <span class="smalllinenumber">[line <a href="../__filesource/fsource_smt2__class.cluster.php.html#a61">61</a>]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void calculateMedian(
)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Computes the cluster median<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodcalculateVariance"></a>
	<h3>method calculateVariance <span class="smalllinenumber">[line <a href="../__filesource/fsource_smt2__class.cluster.php.html#a88">88</a>]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void calculateVariance(
)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Computes the cluster variance, defined as the second sample central moment.<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>link:</b>&nbsp;&nbsp;</td><td><a href="http://mathworld.wolfram.com/SampleVariance.html">http://mathworld.wolfram.com/SampleVariance.html</a></td>
  </tr>
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
  <hr />
	<a name="methodsetMaxPoint"></a>
	<h3>method setMaxPoint <span class="smalllinenumber">[line <a href="../__filesource/fsource_smt2__class.cluster.php.html#a30">30</a>]</span></h3>
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code_border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void setMaxPoint(

$point)</code>
    </td></tr></table>
    </td></tr></table><br />
	
		Sets the maximum point value from vectors sample<br /><br /><br /><br />
<h4>Tags:</h4>
<div class="tags">
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><b>access:</b>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
</div>
<br /><br />

	
        <h4>Parameters:</h4>
    <div class="tags">
    <table border="0" cellspacing="0" cellpadding="0">
          <tr>
        <td class="type">&nbsp;&nbsp;</td>
        <td><b>$point</b>&nbsp;&nbsp;</td>
        <td></td>
      </tr>
        </table>
    </div><br />
        <div class="top">[ <a href="#top">Top</a> ]</div>
  </div>
</div><br />


        <div class="credit">
		    <hr />
		    Documentation generated on Sun, 21 Feb 2010 16:07:56 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>